package org.dromara.xxmj.mapper;

import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.xxmj.domain.UserExerciseRecord;
import org.dromara.xxmj.domain.vo.CourseVo;
import org.dromara.xxmj.domain.vo.GetTodayPracticeVO;
import org.springframework.stereotype.Repository;

/**
 * 用户习题记录Mapper接口
 *
 * @author Vincent
 */
@Repository
public interface UserExerciseRecordMapper extends BaseMapperPlus<UserExerciseRecord, CourseVo> {

    /**
     * 获取用户的习题正确率
     *
     * @param userId 用户ID
     * @param videoId 视频ID
     * @return 正确率（百分比）
     */
    Integer getUserExerciseCorrectRate(Long userId, Long videoId);

    /**
     * 获取用户习题完成数量
     *
     * @param userId 用户ID
     * @param videoId 视频ID
     * @return 完成数量
     */
    Integer getUserExerciseCompletedCount(Long userId, Long videoId);


}
